#include<iostream>

using namespace std;
// zdl:: 这都啊题目其实就是一道图结构的遍历加一个小贪心就可以解决的问题！
#include<vector>
const int N = 110;

vector<int> edges[N];
int n, m;
int ret[N];
int main()
{
    cin >> n >> m;
    for (int i = 1; i <= m; i++)
    {
        int a, b; cin >> a>> b;
        edges[a].emplace_back(b);
        edges[b].emplace_back(a);
    }
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= 4; j++)
        {
            bool flag = true;
            for (auto x : edges[i])
            {
                if (ret[x] == j) 
                {
                    flag = false;
                    break;
                }
            }
            if (flag)
            {
                ret[i] = j;
                break;
            }
        }
    }

    for (int i = 1; i <= n; i++) cout << ret[i];
    return 0;
}